AWK = awk
RST2HTML = rst2html
DOT = dot

HTMLDOCS = doc/dbridge-linux.html doc/dbridge-help.html
GENERATED_IMAGES = doc/images/messageflow.png
IMAGES = $(GENERATED_IMAGES) \
      	doc/images/db-initial.png \
      	doc/images/fpnp-binkd.png \
      	doc/images/fpnp-install.png

GENERATED = $(GENERATED_IMAGES) $(HTMLDOCS)

%.html: %.txt
	$(RST2HTML) $< $@

%.png: %.dot
	$(DOT) -Tpng -o $@ $<

all: $(HTMLDOCS) $(IMAGES)

doc/dbridge-linux.html: doc/dbridge-linux.txt

doc/dbridge-help.html: doc/dbridge-help.txt
	$(AWK) -f ./scripts/dbhelp2html.awk $< > $@

clean:
	rm -f $(GENERATED)

